Skip to content

Conversation

@zharinov
Copy link
Member

Summary

  • Module struct for loading compiled bytecode (owned or memory-mapped)
  • Lazy instruction decoding via decode_step() / decode_step_view()
  • Zero-copy views for strings, symbols, types, entrypoints
  • Validates magic, version, and size on load

Test plan

  • All existing tests pass
  • Module loading from bytes and mmap
  • Error cases (too small, invalid magic, wrong version, size mismatch)
  • All view types tested

Add unified module storage with lazy decoding:
- Module: owns or mmaps bytecode, provides section views
- Instruction/InstructionView: decoded instruction wrappers
- StringsView, SymbolsView, TypesView, etc.
- Update binary format documentation
@zharinov zharinov force-pushed the feat/bytecode-module branch from 1707cc5 to 3868ee5 Compare December 29, 2025 19:58
@zharinov zharinov merged commit 2ad7690 into master Dec 29, 2025
4 checks passed
@zharinov zharinov deleted the feat/bytecode-module branch December 29, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants